package cn.emall.controller;

import cn.emall.content.service.ContentService;
import cn.emall.pojo.TbContent;
import cn.emall.utils.EmallResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 内容管理Controller
 */
@Controller
public class ContentController {

    @Autowired
    private ContentService contentService;

    @RequestMapping(value = "/content/save")
    @ResponseBody
    public EmallResult addContent(TbContent tbContent){
        EmallResult result = contentService.addContent(tbContent);
        return result;
    }

}
